package sk.tuke.client.components.forms;

import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.layout.HLayout;

public class ComponentsFactory {

	public HLayout createHLayoutWithText(String text, Integer width, Integer height, Alignment alignment) {
		HLayout layout = new HLayout();
		if (text != null) {
			layout.setContents(text);
		}
		if (width != null) {
			layout.setWidth(width);
		}
		if (height != null) {
			layout.setHeight(height);
		}
		if (alignment != null) {
			layout.setAlign(alignment);
		}
		return layout;
	}

}
